package com.kaishengit.dao;

import java.util.List;

import org.hibernate.Query;
import org.springframework.stereotype.Repository;

import com.kaishengit.pojo.Filetype;
import com.kaishengit.pojo.Project;

@Repository
@SuppressWarnings("unchecked")
public class FiletypeDao extends BaseDao<Filetype,Integer>{

	public List<Filetype> findByProjectId(Project project) {
		Query query = getSession().createQuery("from Filetype where project=:project");
		query.setParameter("project", project);
		return query.list();
	}
	
	public List<Filetype> findByProject(Project project) {
		Query query = getSession().createQuery("from Filetype where project=:project");
		query.setParameter("project", project);
		return query.list();
	}

}
